import Vue from 'vue'
import Router from 'vue-router'
import VueResource from 'vue-resource'
// import HelloWorld from '@/components/HelloWorld'

Vue.use(Router)
Vue.use(VueResource)

export default new Router({
  routes: [
    // 未登录主页
    {
      path: '/',
      name: 'Home',
      component: () => import('../pages/home/index'),
      meta: { title: 'home' }
    },
    // 登陆后主页
    {
      path: '/home',
      component: () => import('../pages/home/index'),
      meta: { title: 'home' }
    },
    {
      path: '/login',
      component: () => import('../pages/login/index'),
      meta: { title: 'login' }
    },
    {
      path: '/register',
      component: () => import('../pages/register/index'),
      meta: { title: 'register' }
    },
    {
      path: '/forgetPwd',
      component: () => import('../pages/forgetPwd/index'),
      meta: { title: 'forgetPwd' }
    },
    {
      path: '/userInfo',
      component: () => import('../pages/userInfo/index'),
      meta: { title: 'userInfo' }
    },
    {
      path: '/sendEmail',
      component: () => import('../pages/sendEmail/index'),
      meta: { title: 'sendEmail' }
    },
    {
      path: '/movieList',
      component: () => import('../pages/movies/index'),
      meta: { title: 'movieList' }
    },
    {
      path: '/movieAdd',
      component: () => import('../pages/movies/movieAdd/index'),
      meta: { title: 'movieAdd' }
    },
    {
      path: '/movieDetail',
      component: () => import('../pages/movies/movieDetail/index'),
      meta: { title: 'movieDetail' }
    },
    {
      path: '/articleAdd',
      component: () => import('../pages/articles/articleAdd/index'),
      meta: { title: 'articleAdd' }
    },
    {
      path: '/articleDetail',
      component: () => import('../pages/articles/articleDetail/index'),
      meta: { title: 'articleDetail' }
    }
  ]
})
